1. Field of the Invention
The invention relates generally to image compression. More specifically, the invention relates to encoding and quantization for image compression.
2. Description of the Related Art
Image compression techniques can be classified as either "lossy" or "lossless". With lossless compression, the original image prior to compression can be exactly recovered when the compressed image is decompressed. Consequently, lossless techniques, whose compression ratios depend upon the entropy of an image, do not achieve high compression ratios and, since they preserve a high percentage of original image information, are computationally expensive. By contrast, lossy compression schemes provide only an approximation of the original image. Thus, with lossy compression, greater compression ratios can be achieved but with loss in image quality compared to lossless techniques. One such lossy technique referred to as "predictive coding" (also called Digital Pulse Code Modulation (DPCM) which is well-known in the art) predicts the value of a successive pixel (pixels are color components related by spatial row, column position) by linearly combining the properties of already processed neighboring pixels. An error pixel is defined as the difference between the original image pixel and the corresponding predicted pixel. The error pixel is first quantized and then binary encoded. Traditionally, the binary encoding involves either using a fixed-length code or variable-length code which encodes the quantized error pixel (value). In the variable-length encoding situation, quantized error values will have different lengths based upon the number of bits needed to represent the value in binary. Strictly variable-length code is difficult to decode and hard to implement in a parallel data system. Variable-length encoding is inherently serial in nature since there is a wide possible variation in the lengths of the quantized error codes. Parallelism is utilized in newer multimedia systems such as the Intel's Pentium.RTM. processor with MMX.TM. technology which is a SIMD (Single Instruction Multiple Data) platform. In such a platform, decoding or decompression of variable-length encoded images is not optimized for attaining the best processor utilization.
For videoconferencing or still imaging by digital cameras, a sequential process such as variable-length encoding is disadvantageous due to the increased time taken to process bits sequentially. This causes the encoding or compression process on the digital camera to be less of a real-time operation, and consequently, the videocorferencing session will be less like a real-time transmission, which is undesirable.
Commercially widespread and well-known lossy compression techniques, such as JPEG (Joint Photographic Experts Group) or MPEG (Motion Pictures Experts Group), are not specifically developed for 8-bit Bayer pattern color images which are usually generated in camera sensors. The 8-bit Bayer color imaging pattern is exemplified by every pixel location containing a single color component either R, G, or B. The Bayer pattern is shown below:
GRGR . . . PA1 BGBG . . . PA1 GRGR . . . PA1 BGBG . . .
If the final image is to be of 24-bit resolution pixels, each pixel having an R, G, and B color component, color interpolation and conversion may be needed for JPEG type compression. To perform this interpolation on circuitry in the digital camera or imaging device is cost prohibitive. A further disadvantage of MPEG and JPEG is that while compressing, they can operate only upon N pixel by N (usually N=8 or 16) pixel blocks, and thus create a need for more memory circuits. While cheap, additional memory circuits are still disadvantageous in that they occupy chip/device area, leading to a more expensive/larger camera. More importantly, the need to collect and store blocks of data decreases the overall speed of the compression process which is also not desirable in imaging conferencing.
Further high compression ratio block-based algorithms such as JPEG suffer from deficiencies such as "blocking artifacts". For block-based algorithms, an image is divided into blocks of pixels such as 8.times.8, or 16.times.16 blocks. These blocks are processed independently of each other and thus, between blocks, there is an observable discontinuity in luminance or color which constitutes a "blocking artifact". Additionally, block-based algorithms (JPEG/MPEG) rely on transformation of original blocks from space domain to frequency domain. Hardware implementation of these transformations is usually computationally expensive and complex.
Thus, there is a need for an image compression technique which is computationally inexpensive such as to reduce the cost of the digital cameras on which they are employed. Additionally, there is a need for enhancing the speed of capture and compression so that the resultant imaging can be performed more real-time. Additionally, compression must be more guaranteed, and not be subject to expansion of the image due to noise, and preserve quality.